<?
	$params[sid] = $sid;
	$params[action] = "editHeader";
	$url = "$baseURL/$webDIR/?".encode_params($params);
	$data = get_interface_settings($id);
        if(is_array($data))
                while(list($k,$v) = each($data)){
                        $$k = $v;
                } 
	switch($header){
		case "text": 
			$ch[0]="checked";
			$text_data = $headerData;
		break;
		case "banner": 
			$ch[1]="checked";
			$banner_data = "[Custom : <a href='$baseURL$headerData'>$headerData</a>";
		break;
		case "custom": 
			$ch[2]="checked";
			$custom_data = $headerData;
		break;
	}



	if($errorMsg) echo "<center>$errorMsg<center>";
	$errorMsg = "";
?>
<TABLE border=1 class='bTable' cellspacing='0' width='750'>
<form action='<?=$url;?>' method='POST' enctype="multipart/form-data">
	<TR>
		<TH>Header</TH>
	</TR>
	<TR>
		<TD>
			<input type='radio' name='type' value='text' <?=$ch[0];?> >Text
			<div>
					<table width='100%'>
						<tr>
							<td width='50'>&nbsp;</td>
							<td><input type='text' name='text_data' value='<?=$text_data?>'></td>
						</tr>
					</table>
			</div>
		</TD>
	</TR>
	<TR>
		<TD>
			<input type='radio' name='type' value='banner' <?=$ch[1];?> >Banner (700x120)  <?=$banner_data?>
			<div>
					<table width='100%'>
						<tr>
							<td width='50'>&nbsp;</td>
							<td><input type='file' name='banner_data' value=''></td>
						</tr>
					</table>
			</div>

		</TD>
	</TR>
	<TR>
		<TD>
			<input type='radio' name='type' value='custom' <?=$ch[2];?> >Custom HTML
			<div>
					<table width='100%'>
						<tr>
							<td width='50'>&nbsp;</td>
							<td><textarea rows=5 cols=40 name='custom_data'><?=$custom_data?></textarea></td>
						</tr>
					</table>
			</div>

		</TD>
	</TR>
	<TR>
		<TD  align='center'>
			<input type='submit' value='Submit'>
		</TD>
	</TR>
</form>
</TABLE>